package br.com.caelum.vraptor.dao;
import java.util.List;

import javax.persistence.NoResultException;

import br.com.caelum.vraptor.entidades.Formulario;
public class FormularioDAO extends GenericJPADAO<Formulario> {
	public FormularioDAO() {
		this.persistentClass = Formulario.class;
	}

	public List<Formulario> find(String date){
		try{
			return getEm().createQuery("select f from Formulario f where f.dtrecebimento like :date", Formulario.class)
					.setParameter("date",date)
					.getResultList();
		}
		catch(NoResultException e){
			e.printStackTrace();
			return null;
		}
	}

}
